/*
 * Node.cpp
 *
 *  Created on: 18/09/2011
 *      Author: godinho
 */

#include <localview/Node.h>

namespace localview {

Node::Node(std::string id) : mId(id) {
	mTraversalStatus = 0;
}

Node::~Node() {
	/**
	 * TODO I need to dealoc mNeighbors ? I think that std::vector do this
	 * already.
	 */
}

std::string Node::getId() {
	return mId;
}

void Node::addPhase(Phase* phase) {
	mPhases.push_back(phase);
}

std::vector<Phase*> Node::getPhase() {
	return mPhases;
}

int Node::getPhaseCount() {
	return mPhases.size();
}

Phase* Node::getPhase(int n) {
	return mPhases[n];
}

std::vector<Link*> Node::getLinks() {
	return mLinks;
}

int Node::getLinkCount() {
	return mLinks.size();
}

Link* Node::getLink(int index) {
	return mLinks[index];
}

int Node::getX(){
	return mX;
}

void Node::setX(int x){
	mX = x;
}

int Node::getY(){
	return mY;
}

void Node::setY(int y) {
	mY = y;
}

void Node::setTraversalStatus(int s) {
	mTraversalStatus = s;
}

int Node::getTraversalStatus() {
	return mTraversalStatus;
}

std::vector<Phase*> Node::getPhases() {
	return mPhases;
}

void Node::addLink(Link* l) {
	mLinks.push_back(l);
}

}
